<%-- 这是首页 --%>
<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'index.jsp' starting page</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css"
			href="/sell_food/bootstrap/css/default.css">
		<style type="text/css">
.content1 {
	width: 84%;
	height: 98%;
	position: relative;
	margin-left: 240px; margin-top : 6px;
	background-color: white;
	position: relative;
	margin-top: 6px;
}
</style>
	</head>
	<body>
		<jsp:include page="top.jsp"></jsp:include>

		<script language="text/javasript">
		$(document).ready(function(){
			$("#${item.itemType}").attr("selected","true")
		});
		</script>

		<div class="content1"  >
			<!-- 商店列表 -->
			<div class="header">
				<h1 class="page-title">
					餐饮
				</h1>
			</div>

			<ul class="breadcrumb" style="height:36px;">
				<li>
					<a href="/sell_food/marchantview/index.jsp">主页</a>
					<span class="divider">/</span>
				</li>
				<li class="active">
					编辑餐饮
				</li>
			</ul>

			<div class="container-fluid">
				<div class="row-fluid">
					<div class="page-header"></div>

					<form action="editItem" method="post" class="form-horizovntal"
						enctype="multipart/form-data">
						<div class="row-fluid">
							<div class="span7">
								<div class="control-group">
									<label class="control-label" for="name">
										餐饮编号
									</label>
									<div class="controls">
										<input name="item.itemId" class="input-xlarge focused"
											id="item.itemId" type="text" readonly="readonly"
											value="<s:property value="item.itemId" />" style="height:30px ;width:250px">
									</div>
								</div>

								<div class="control-group">
									<label class="control-label" for="name">
										餐饮名称
									</label>
									<div class="controls">
										<input name="item.itemName" class="input-xlarge focused"
											id="item.itemName" type="text"
											value="<s:property value="item.itemName" />" style="height:30px ;width:250px">
										<p style="color: red;">
											<s:property value="fieldErrors.itemName[0]" />
										</p>
									</div>
								</div>

								<div class="control-group">
									<label class="control-label" for="name">
										餐饮类型
									</label>
									<div class="controls">
										<div class="controls">
											<select name="item.itemType" id="item.itemType" style="height:30px ;width:250px">
											<s:iterator value="allItemType" status="st">
  			
											<option value="<s:property value="Itemname"/>">
												<s:property value="ItemTypeName"/>
											</option>
				
											</s:iterator>	
    								</select>
										</div>
									</div>
								</div>

								<div class="control-group">
									<label class="control-label" for="name">
										餐饮价格
									</label>
									<div class="controls">
										<input name="item.itemPrice" class="input-xlarge focused"
											id="item.itemPrice" type="text"
											value="<s:property value="item.itemPrice" />" style="height:30px ;width:250px">
										<p style="color: red;">
											<s:property value="fieldErrors.itemPrice[0]" />
										</p>
									</div>
								</div>

								<div class="control-group">
									<label class="control-label" for="name">
										餐饮销量
									</label>
									<div class="controls">
										<input name="item.itemNum" class="input-xlarge focused"
											id="item.itemNum" type="text"
											value="<s:property value="item.itemNum" />" readonly="readonly" style="height:30px ;width:250px;resize:none">
										<p style="color: red;">
											<s:property value="fieldErrors.itemNum[0]" />
										</p>
									</div>
								</div>

								<div class="control-group">
									<label class="control-label" for="remark">
										餐饮备注
									</label>
									<div class="controls">
										<textarea rows="4" cols="20" name="item.itemDescription"
											id="item.itemDescription" style="height:100px ;width:250px;resize:none">
											<s:property value="item.itemDescription" />
											</textarea>
									</div>
								</div>

							</div>

							<div class="span5">
								<div class="fileupload fileupload-new"
									data-provides="fileupload">
									<div class="fileupload-preview  thumbnail"
										style="width: 220px; height: 170px;">
										<img src="<s:property value="item.itemPicture" />" alt=""
											width="220" height="170">
									</div>
									<div>
										<span class="btn btn-file"><span class="fileupload-new">上传商店图片</span>
											<span class="fileupload-exists">更改</span> <input type="file"
												name="itemPicture" /> </span>
										<a href="#" class="btn fileupload-exists"
											data-dismiss="fileupload">删除</a>
									</div>
								</div>
							</div>

						</div>
						<div>
							<button type="submit" class="btn btn-primary">
								提交
							</button>

							<button class="btn" type="button" onclick="location.href='showItem'">
								返 回
							</button>
						</div>
					</form>
				</div>
			</div>
		</div>
	</body>
</html>
